<%-- 
    Document   : BajaModHab
    Created on : 22-dic-2014, 20:18:10
    Author     : Micaela
--%>

<%@page import="Beans.Habitacion"%>
<%@page import="java.util.LinkedList"%>
<%@page import="Beans.Hotel"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>Modificar o eliminar habitacion</title>
    </head>
     <style type="text/css">
             body{
          background-image: url("http://www.fondox.net/wallpapers/resoluciones/13/ciudad-de-nueva-york_1920x1200_304.jpg");
           }
    </style>
    <body>
      <table id="results">
                <tr>
                    <td></td>
                    <td></td>
                    <td>Tipo</td>
                    <td>Capacidad</td>
                    <td>Precio</td>
                    <td>Modificar</td>
                    <td>Eliminar</td>
                </tr>
                <%
                    LinkedList<Habitacion> lista=(LinkedList<Habitacion>)request.getAttribute("listaHabs");
                    for(Habitacion h:lista){
                        out.println("<tr>");
                        out.print("<form action=\"BajaModHabitacion\" method=\"post\">");
                        out.println("<TD><input type=\"hidden\" name=\"IdHotel\" value=\""+h.getUnHotel().getIdHotel()+"\" /></TD>");
                        out.println("<TD><input type=\"hidden\" name=\"Numero\" value=\""+h.getNumero()+"\" /></TD>");
                        out.println("<TD><input type=\"text\" name=\"Tipo\" value=\""+h.getTipo()+"\" /></TD>");
                        out.println("<TD><input type=\"text\" name=\"Capacidad\" value=\""+h.getCapacidad()+"\" /></TD>");
                        out.println("<TD><input type=\"text\" name=\"Precio\" value=\""+h.getPrecio()+"\" /></TD>");
                        out.print("<TD><button type=\"submit\" name=\"mod\" value=\"Modificar\" /></TD>");
                        out.print("<TD><button type=\"submit\" name=\"baja\" value=\"Eliminar\" /></TD>");                    
                        out.print("</form>");
                        out.println("</tr>");
                    }
                %>
            </table>
    </body>
</html>
